#include <assert.h>

#include "GL/glut.h"

#include "keyboard.h"
#include "tileManager.h"
#include "soundManager.h"
#include "board.h"
#include "draw.h"
#include "idle.h"


int main(int argc, char **argv) {
	// Initialize glut
	glutInit(&argc, argv);
	glutInitDisplayMode(GLUT_DOUBLE | GLUT_DEPTH | GLUT_RGB | GLUT_STENCIL);

	// Create the OpenGL window.
	glutInitWindowSize(WINDOW_WIDTH, WINDOW_HEIGHT);
	glutInitWindowPosition(10, 10);
	glutCreateWindow("Delusionist");

	initGL();
	initTiles();
	initSounds();
	initBoards();
	gotoTitle();

	// Setup glut callbacks.
	glutDisplayFunc(draw);
	glutKeyboardFunc(keyboard);
	glutIdleFunc(idle);
	glutMainLoop();

	return 0;
}

// end of main.cpp
